<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>CSS三角形</title>
    <style>
      .trangle::after {
        content: "";
        position: absolute;
        width: 0;
        height: 0;
        /* border-top: 20px solid red; */
        border-right: 14px solid transparent;
        border-bottom: 14px solid white;
        border-left: 14px solid transparent;
        left: -14px;
        top: 4px;
      }
    </style>
  </head>
  <body>
    <h1>CSS三角形</h1>
    <div
      class="trangle"
      style="
        width: 0;
        height: 0;
        /* border-top: 20px solid red; */
        border-right: 20px solid transparent;
        border-bottom: 20px solid blue;
        border-left: 20px solid transparent;
        position: relative;
      "
    ></div>
  </body>
</html>
